Skip to content

fix vsgMacros.cmake#1675

Merged
robertosfield merged 1 commit into
vsg-dev:masterfrom
St0fF-NPL-ToM:master
Feb 12, 2026
Merged

fix vsgMacros.cmake#1675
robertosfield merged 1 commit into
vsg-dev:masterfrom
St0fF-NPL-ToM:master

Conversation

@St0fF-NPL-ToM
Copy link
Copy Markdown
Contributor

Pull Request: fix vsg cmake macro "vsg_add_cmake_support_files"

Description

The macro vsg_add_cmake_support_files is missing an export( EXPORT ) CMake statement.

  • results:
    • in-tree builds not working properly
    • FetchContent does not work with vsg
  • fix: simply add corresponding CMake command.

Fixes # no issue created, simply fixed it.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Create a repo, use CMake FetchContent to get current vsg into the build. Even if all works out well, linking the executable / library to vsg::vsg FAILS.

Create a repo with submodule(s) vsg (and maybe vsgImGui), try to link own executable to vsg::vsg after including vsg via add_subdirectory() → FAILS.

In In-Tree case: this works directly

add_subdirectory( vsg )
export( EXPORT vsgTargets NAMESPACE vsg:: )

But it is not a "pro" solution, as this line of code belongs into that macro!

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
    • I have committed tests that show my fix is working

## macro: vsg_add_cmake_support_files
- missing: export( EXPORT ) Cmake statement
- results:
  - in-tree builds not working properly
  - FetchContent does not work with vsg
- fix: simply added corresponding CMake command.
@robertosfield robertosfield merged commit 6271390 into vsg-dev:master Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants